package com.storeroompda.ui.basesync;

import com.storeroompda.base.present.BasePresenter;
import com.storeroompda.ui.config.ConfigModel;
import com.storeroompda.ui.config.ConfigView;

public class BaseSyncPresent extends BasePresenter<BaseSyncModel, BaseSyncView> implements BaseSyncModel.CallBack {
    public void config(String address, String port) {
        view.showProgress();
        model.config(address, port,this);
    }

    public void disconnect() {
        model.disconnect(this);
    }

    public void downinfo() {
        view.showProgress();
        model.basedown(this);
    }

    public void upinfo() {
        view.showProgress();
        model.baseup(this);
    }

    @Override
    public void onShow(String str) {
        view.hideProgress();
        view.config(str);
    }

    @Override
    public void onFail(String str) {
        view.hideProgress();
        view.config("连接失败");
    }

    @Override
    public void onbasesync(String str) {
        view.hideProgress();
        view.sync(str);
    }
}


